package com.kwedding.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kwedding.dto.app.RequestgetMedia;
import com.kwedding.dto.app.ResponseMedia;
import com.kwedding.service.app.MediaService;
import com.kwedding.util.BackJson;
import com.kwedding.util.JsonBackBase;
import com.kwedding.util.LoggerParent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/rest/media")
@Api(tags = "视频")
public class MediaController extends LoggerParent {

	@Autowired
	private MediaService mediaService;

	@ApiOperation(" 根据类型获取品牌视频")
	@ResponseBody
	@RequestMapping(value = "getMeida", method = { RequestMethod.POST })
	private JsonBackBase<ResponseMedia> getMeida(@RequestBody RequestgetMedia getMedia) {
		return BackJson.successObj(mediaService.getMeida(getMedia));
	}

}
